package boardgamer.common.net;

import boardgamer.common.annotations.Immutable;

import java.io.Serializable;

/**
 * Player identifier used by the game and the network channel to identify
 * different players.
 *
 * @author garysoed
 */
@Immutable
public abstract class PlayerId implements Serializable {

  @Override
  public String toString() {
    return getName();
  }

  /**
   * Gets the player's name to be displayed on the client
   */
  public abstract String getName();
}
